/*
 * @Author: Jiraiya
 * @Date: 2020-05-06 11:29:55
 * @LastEditors: Jiraiya
 * @LastEditTime: 2020-05-08 14:47:50
 * @Description: 
 */
'use strict'

const path = require('path');

const config = {};

//日志
config.log = {
    name: 'node-ssr',
    streams: [
        {
            level: 'info',
            path: '/opt/app/node-logs/node-ssr/log/info.log'
        },
        {
            level: 'error',
            path: '/opt/app/node-logs/node-ssr/log/error.log'
        },
        {
            level: 'fatal',
            path: '/opt/app/node-logs/node-ssr/log/fatal.log'
        }
    ]
};

// 中间件



//rewrite
config.rewrite = [
    {
        match: '/activity/:activityId-:pageId.html',
        rewrite: '/'
    },
    {
        match: '/mgm/:activityId-:pageId.html',
        rewrite: '/mgm/mgm/page'
    },
    {
        match: '/rule/:activityId-:pageId.html',
        rewrite: '/activity/activity/rule'
    },
    {
        match: '/sw.js',
        rewrite: '/sw/sw/file'
    },
];


module.exports = config;